import React from 'react';
import AppBoy from "./AppBoy";
import AppGirl from "./AppGirl";
import ThemeContext from "./context/ThemeContext";
import UserContext from "./context/UserContext";

class ConnectionContext extends React.Component {
    render() {
        return (
            <div>
                <h1>非父子组件共享数据</h1>

                <ThemeContext value={{color: 'red', fontSize: '55px'}}>
                    <UserContext value={{username: '小八嘎', userId: 404}}>
                        <AppBoy/>
                        <AppGirl/>
                    </UserContext>
                </ThemeContext>
            </div>
        )
    }
}
export default ConnectionContext